﻿Imports QueComer

Public Class MiRestEditForm

    Private Sub btnGuardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuardar.Click
        Dim negocio As New Gestion_Rest
        Dim name = Me.nombrey.Text
        Dim food = Me.tipo_comiday.Text
        Dim dist = Me.distritoy.Text
        Dim addr = Me.direcciony.Text
        Dim ruk = Me.rucy.Text
        negocio.actualizarxname(name, food, dist, addr, ruk)
        Me.Close()
    End Sub

    Private Sub NuevoRestaurantForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim estetag = Me.Text
        Dim negocio As New Gestion_Rest
        Dim modelo = negocio.obtener2(estetag)
        nombrey.Text = modelo.nombre
        tipo_comiday.Text = modelo.tipo_comida
        distritoy.Text = modelo.distrito
        direcciony.Text = modelo.direccion
        rucy.Text = modelo.ruc

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()
    End Sub
End Class